package com.doubi.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.doubi.mapper.SysRolePermissionMapper;
import com.doubi.model.sys.TSysRolePermission;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;

@Service
public class SysRolePermissionService extends ServiceImpl<SysRolePermissionMapper, TSysRolePermission> {
    @Autowired
    private SysRolePermissionMapper sysRolePermissionMapper;

    public void deleteAllByRoleOid(String roleOid){
        sysRolePermissionMapper.deleteByMap(new HashMap<String, Object>(){{
            put("sys_role_oid",roleOid);
        }});
    }
}
